package com.m3958.firstgwt.client.datasource;

import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.m3958.firstgwt.shared.type.CommonField;
import com.smartgwt.client.data.fields.DataSourceTextField;

@Singleton
public class OutWebSiteDatasource extends BaseDataSource{
	
	public static String className = "com.m3958.firstgwt.server.model.OutWebSite";
	
	
    @Inject
    public OutWebSiteDatasource(DsErrorHandler deh) {
    	setID("outWebSiteDS");
    	
    	DataSourceTextField nameField = new DataSourceTextField(CommonField.NAME.getEname(),CommonField.NAME.getCname());
    	nameField.setRequired(true);
        addHandleErrorHandler(deh);
        
        setFields(getIdField(),getVersionField(),nameField,getCreatedAtField(true));
        setClientOnly(false);
       
    }

	@Override
	protected String getModelClassName() {
		return className;
	}

}
